#!/usr/bin/perl
$original_extension = ".jpg_thumb.jpg";
$new_extension = "_thumb.jpg";

opendir (FOLDER,".");
@files = grep (!/^\..*$/, readdir (FOLDER));
closedir (FOLDER);

foreach $file (@files)
{
$file1 = $file;
$file1 =~ s/$original_extension$/$new_extension/ig;
rename ("$file","$file1");
}


